﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace JGSY.SmartIndustry.Dashboard.Core
{
    public class Command : ICommand
    {

        public event EventHandler? CanExecuteChanged;

        public bool CanExecute(object? parameter) => true;

        public void Execute(object? parameter)
        {
            on_execute?.Invoke(parameter);
        }

        Action<object?> on_execute;
        public Command(Action<object?> onExecute)
        {
            on_execute = onExecute;
        }
    }

}
